<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('订单统计')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-12 search-collapse">
                            <form id="formId">
                                <div class="select-list">
                                    <ul>
                                        <li class="select-time">
                                            <p>时间：</p>
                                            <select name="dateFilteType" heigh="80px" id="dateFilteType">
                                                <option th:selected="${dateFilteType==0}" value="0">本日</option>
                                                <option th:selected="${dateFilteType==1}" value="1">本周</option>
                                                <option th:selected="${dateFilteType==2}" value="2">本月</option>
                                            </select>
                                        </li>
                                        <li>
                                            <a class="btn btn-primary btn-rounded btn-sm" onclick="dateFilteType()"><i
                                                    class="fa fa-search"></i>&nbsp;搜索</a>
                                            <!--<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i-->
                                            <!--class="fa fa-refresh"></i>&nbsp;重置</a>-->
                                        </li>
                                    </ul>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>店铺ID</th>
                                <th>时间</th>
                                <th>支付数量</th>
                                <th>订单金额</th>
                                <td>交易用户数</td>
                                <th>退款订单数</th>
                                <th>退款金额</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each=" info: ${orderStatisticListInfo.financeOrderStatisticList}">
                                <td th:text="${info.storeId}"></td>
                                <td th:text="${info.dateStr}"></td>
                                <td th:text="${info.payOrderNum}"></td>
                                <td th:text="${info.orderAmount}"></td>
                                <td th:text="${info.transactionUserNum}"></td>
                                <td th:text="${info.refundOrderNum}"></td>
                                <td th:text="${info.refundAmount}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
        </div>

    </div>
    <div class="row" style="margin-bottom: 10px;">
        <div class="col-sm-12">
            <span>合计：订单金额：¥ <span th:text="${orderStatisticListInfo.orderStatisticTotalInfo.totalOrderAmount}"></span>，
                退款金额：¥ <span th:text="${orderStatisticListInfo.orderStatisticTotalInfo.totalRefundAmount}"></span>，
                支付净额： ¥ <span th:text="${orderStatisticListInfo.orderStatisticTotalInfo.totalPayAmount}"></span></span>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">

    function dateFilteType() {
        var dateFilteType = $("#dateFilteType").val();
        location.href = ctx + "finance/financeOrderStatistic?dateFilteType=" + dateFilteType;
    }
</script>
</body>
</html>

